<include file="Public:pagerForm" />

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="__URL__" method="post">
	<div class="searchBar">
      <table>
			<tr>
				<td style="white-space: nowrap;">单据编号：<input type="text" name="selectname" value="{$_POST['selectname']}"/>
				</td>
				<td style="white-space: nowrap;" title="单据类型"><select class="combox" name="ordertype">
    				<option value="">所有单据</option>
    				<option value="1" <eq name="_POST['ordertype']" value="1" >selected</eq>>进货单</option>
    				<option value="2" <eq name="_POST['ordertype']" value="2" >selected</eq>>进货退货单</option>
    				<option value="3" <eq name="_POST['ordertype']" value="3" >selected</eq>>销售单</option>
    				<option value="4" <eq name="_POST['ordertype']" value="4" >selected</eq>>销售退货单</option>
    				<option value="5" <eq name="_POST['ordertype']" value="5" >selected</eq>>仓库组装单</option>
    			</select>
				</td>
				<td style="white-space: nowrap;" title="状态"><select class="combox" name="dealstatus">
                    <option <eq name="_POST['dealstatus']" value="0" >selected</eq> value="0">所有状态</option>
					<option <eq name="_POST['dealstatus']" value="1" >selected</eq> value="1">未结库</option>
                    <option <eq name="_POST['dealstatus']" value="2" >selected</eq> value="2">未结款</option>
					<option <eq name="_POST['dealstatus']" value="3" >selected</eq> value="3">已结单</option>
				</select>
				</td>
			</tr>
		</table>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索单据</button></div></div></li>
			<!--	<li><a class="button" href="demo_page6.html" target="dialog" mask="true" title="查询框"><span>高级检索</span></a></li>-->
			</ul>
		</div>
	</div>
	</form>
</div>

<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="edit" href="__URL__/doDealOder" target="selectedTodo" mask="true" rel="ids[]" title="注意:处理单据后无法撤销,你确定要提交数据库吗？" warn="请选择要处理的单据"><span>处理选中单据</span></a></li>
			<li><a class="delete" href="__URL__/delOrders" target="selectedTodo" rel="ids[]" title="警告:删除后无法恢复,你确定要删除吗？" warn="请选择要删除的单据"><span>删除选中单据</span></a></li>
            <!--<li><a class="icon" href="dwz-team.xls" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>-->
			</ul>
	</div>
    <div layoutH="119">
	<table class="list" width="98%" targetType="navTab" asc="asc" desc="desc">
		<thead>
		<tr>
            <th><input type="checkbox" group="ids[]" class="checkboxCtrl"></th>
			<th align=center orderField="ordernumber" <if condition="$_REQUEST._order eq 'ordernumber'">class="{$_REQUEST._sort}"</if>>单据编号</th>
			<th align=center orderField="ordertype" <if condition="$_REQUEST._order eq 'ordertype'">class="{$_REQUEST._sort}"</if>>单据类型</th>
			<th align=center orderField="sendname" <if condition="$_REQUEST._order eq 'sendname'">class="{$_REQUEST._sort}"</if>>单据对象</th>
			<th align=center orderField="warehouse" <if condition="$_REQUEST._order eq 'warehouse'">class="{$_REQUEST._sort}"</if>>仓 库</th>
            <th align=center orderField="ordertime" <if condition="$_REQUEST._order eq 'ordertime'">class="{$_REQUEST._sort}"</if>>单据日期</th>
            <th align=center orderField="ordernums" <if condition="$_REQUEST._order eq 'ordernums'">class="{$_REQUEST._sort}"</if>>交易数量</th>
            <th align=center orderField="orderamount" <if condition="$_REQUEST._order eq 'orderamount'">class="{$_REQUEST._sort}"</if>>交易金额(￥)</th>
            <th align=center orderField="orderuser" <if condition="$_REQUEST._order eq 'orderuser'">class="{$_REQUEST._sort}"</if>>经办人</th>
            <th align=center orderField="createuser" <if condition="$_REQUEST._order eq 'createuser'">class="{$_REQUEST._sort}"</if>>制单人</th>
            <th align=center orderField="createtime" <if condition="$_REQUEST._order eq 'createtime'">class="{$_REQUEST._sort}"</if>>建单日期</th> 
            <th align=center orderField="dealstatus" <if condition="$_REQUEST._order eq 'dealstatus'">class="{$_REQUEST._sort}"</if>>结库状态</th> 
            <th align=center orderField="stkstatus" <if condition="$_REQUEST._order eq 'stkstatus'">class="{$_REQUEST._sort}"</if>>结款状态</th> 
            <th align=center orderField="paystatus" <if condition="$_REQUEST._order eq 'paystatus'">class="{$_REQUEST._sort}"</if>>单据状态</th> 
            <th align=center>操作</th>      	
		</tr>
		</thead>
		<tbody>
		<volist id="vo" name="list">
			<tr target="sid_user" rel="{$vo['id']}">
                <td><input name="ids[]" value="{$vo['id']}" type="checkbox"></td>
				<td align=center><a href="__URL__/printOrder/orderId/{$vo['id']}" class="printOrder" title="{$vo['ordernumber']}" target="navTab" mask="true">{$vo['ordernumber']}</a></td>
				<td align=center>{$vo['ordertype']|getOrdertype}</td>
				<td>{$vo['contactid']|getTableColVal=Contacts,comname}</td>
                <td>{$vo['warehouse']|getTableColVal=Warehouse,wahname}</td>                
                <td align=center>{$vo['ordertime']|date="Y-m-d",###}</td>                
                <td align=center>{$vo['ordernums']}</td>
                <td align=right>{$vo['orderamount']}</td>
                <td align=center>{$vo['orderuser']|getTableColVal=User,nickname}</td>
                <td align=center>{$vo['createuser']|getTableColVal=User,nickname}</td>
                <td align=center>{$vo['createtime']|date="Y-m-d  H:i:s",###}</td>
                <td align=center>{$vo['stkstatus']|getStkstatus}</td>
                <td align=center>{$vo['paystatus']|getPaystatus}</td>
				<td align=center>{$vo['status']|getDealStatus}</td>
                <td align=center>{$vo['status']|showDealStatus=$vo['id']}</td>
                                      
			</tr>
		</volist>
		</tbody>
	</table>
    </div>
	<div class="panelBar">
		<div class="pages">
            <span>显示</span>
			<select name="numPerPage" class="combox" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="1">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
				<option value="200">200</option>
			</select>
			<span>共{$totalCount}条</span>
		</div>
		<div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="10" currentPage="{$currentPage}"></div>
	</div>
</div>